package com.hk.web.domain.entity;

import com.hk.commons.domain.entity.IdEntity;
import com.hk.commons.enums.Whether;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

/**
 *
 * @author Antinomy
 * @date 17/11/3
 */
@Entity
@EntityListeners(AuditingEntityListener.class)
public class MerchantUserAccount extends IdEntity {

    @Column(columnDefinition = "bigint(22) NOT NULL comment '用户ID'")
    private Long userId;

    @Column(columnDefinition = "varchar(255) comment '商户公钥'")
    private String merchantKey;

    @Column(columnDefinition = "varchar(50) comment '用户手机'")
    private String mobile;

    @Column(columnDefinition = "varchar(50) NOT NULL comment '用户在商户内的唯一识别码'")
    private String merchantAccountId;

    @Column(columnDefinition = "varchar(10) NOT NULL comment '是否启用'")
    @Enumerated(EnumType.STRING)
    private Whether enable = Whether.YES;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getMerchantKey() {
        return merchantKey;
    }

    public void setMerchantKey(String merchantKey) {
        this.merchantKey = merchantKey;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMerchantAccountId() {
        return merchantAccountId;
    }

    public void setMerchantAccountId(String merchantAccountId) {
        this.merchantAccountId = merchantAccountId;
    }

    public Whether getEnable() {
        return enable;
    }

    public void setEnable(Whether enable) {
        this.enable = enable;
    }
}
